
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<style type="text/css">
table{
 text-align: left;
}
</style>
<script type="text/javascript">
function ss(){
    $("tr").attr("target","");
    $("tr").attr("rel","");
}
  function tr(){
  var ss=$("table input:checked").val();
  $("tr").attr("rel",ss);
  $("tr").attr("target","sid_user");

  }
 
  
     
</script>
<form id="pagerForm" method="post" action="<%=basePath %>breakage/find.do">
	<input type="hidden" name="pageNum" value="${requestScope.condition.pageNum}" />
	<input type="hidden" name="numPerPage" value="${requestScope.condition.numPerPage}" />	
	<input type="hidden" name="id" value="${requestScope.condition.id}">
	<input type="hidden" name="create_time" value="${requestScope.condition.create_time}" />
	<input type="hidden" name="operator" value="${requestScope.condition.operator}" />
	<input type="hidden" name="approver" value="${requestScope.condition.approver}" />
</form>
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=basePath %>breakage/find.do" method="post">
	<div class="searchBar">

		<table class="searchContent">
			<tr>
				<td>
				
					报损流水号：<input type="text" name="code" value="${requestScope.condition.code}"/>
				</td>

				<td>
					报损时间：<input type="text" class="date" readonly="true" name="create_time" value="${requestScope.condition.create_time}"/>
				</td>
			
				<td>
					操作人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="operator" value="${requestScope.condition.operator}"/>
				</td>

				<td>
					审批人：&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="approver"  value="${requestScope.condition.approver}" />
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
			    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
				<li><a class="buttonActive" href="<%=basePath %>breakage/message.do?id={sid_user}" onclick="ss()" target="dialog" mask="true" title="查看信息"  width="800" height="400"><div class="buttonContent"><button type="button">查看</button></div></a></li>
			</ul>
		</div>
	</div>
	</form>

	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<%=basePath %>goods/message.do" target="dialog"  title="新增报损" width="800" height="400"><span>新增</span></a></li>
			<li><a class="delete" href="breakage/delete.do" target="selectedTodo" rel="abc" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="<%=basePath %>breakage/update.do?id={sid_user}" target="dialog"  title="审批报损" width="800" height="400" onclick="ss()"><span>审批</span></a></li>
			</ul>
	</div>
	<table class="table" width="100%" layoutH="138" id="tab1">
		<thead>
			<tr>
			<th width="16" align="center"></th>
				<th width="10" align="center"></th>
				<th width="200">报损流水号</th>
				<th width="80">报损人员</th>
				<th width="80">审批人</th>
				<th width="80">报损时间</th>
				<th width="80" align="center">状态</th>
				<th width="80">金额</th>
			</tr>
		</thead>
		<tbody>	
   <c:forEach items="${requestScope.list }" var="s" varStatus="ff">
         	<tr target="" rel="" id="ttr">
           <td width="16" align="center">${ff.index+1 }</td>
           <td  width="10" align="center"><input type="checkbox" name="abc" value="${s.id }" onclick="tr()"/></td>
           <td width="200">${s.code }</td>
           <td width="80">${s.operator }</td>
           <td width="80">${s.approver }</td>
           <td width="80">${s.create_time }</td>
           <td width="80" align="center">
           <c:if test="${s.status == '0'}">未审批</c:if>
           <c:if test="${s.status == '1'}">同意</c:if>
           <c:if test="${s.status == '2'}">拒绝</c:if>
           </td>
           <td width="80">${s.money }</td>
         </tr>
   	</c:forEach>
		</tbody>	
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
			</select>
			<span>条，共${requestScope.condition.totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${requestScope.condition.totalCount}" numPerPage="${requestScope.condition.numPerPage}" pageNumShown="5" currentPage="${requestScope.condition.pageNum}"></div>
	</div>
</div>


